<?php
class P extends Controller{

	function __construct(){
		parent::__construct();
	
	}
	function index()
	{		
			$sql=new sql();
			$sql->connect();
			
			$permalinks=explode('/',$_SERVER['REQUEST_URI']);
			$permalinks=$permalinks[count($permalinks)-1];
			
			$this->view->row=$sql->fetch("page",array("permalink"=>$permalinks));
			  $this->view->render('p');
			  
	}
}

?>